<template>
	<view class="agriculturalBox">
		<!-- 头部表格start -->
		<view class="messagehead">
			<view class="updata">
				<!-- 个人信息 -->
				<view class="archives">
					<view class="archives-title">
						<text>村庄信息</text>
					</view>
					<view class="archives-form">
						
						<view class="archives-form-item" @click="cityShow=true">
							<view class="afi-label">
								<text></text>
								<text>市</text>
							</view>
							<input type="text" v-model="detData.city">
							<text></text>
						</view>
						<view class="archives-form-item">
							<view class="afi-label">
								<text></text>
								<text>市区</text>
							</view>
							<input type="text" v-model="detData.division">
							<text></text>
						</view>
						<view class="archives-form-item">
							<view class="afi-label">
								<text></text>
								<text>镇街道</text>
							</view>
							<input type="text" v-model="detData.town">
							<text></text>
						</view>
						<view class="archives-form-item">
							<view class="afi-label">
								<text></text>
								<text>村</text>
							</view>
							<input type="text" v-model="detData.village">
							<text></text>
						</view>
						<view class="archives-form-item" @click="show=true">
							<view class="afi-label">
								<text></text>
								<text>村庄名称</text>
							</view>
							<input type="text" v-model="detData.villageName" @click="show=true">
							<text></text>
						</view>
						<view class="archives-form-item">
							<view class="afi-label">
								<text></text>
								<text>户数</text>
							</view>
							<input type="number" v-model="detData.households">
							<text></text>
						</view>
						<view class="archives-form-item">
							<view class="afi-label">
								<text></text>
								<text>村党组织书记姓名</text>
							</view>
							<input type="text" v-model="detData.secAme">
							<text></text>
						</view>
						<view class="archives-form-item">
							<view class="afi-label">
								<text></text>
								<text>村党组织书记联系电话</text>
							</view>
							<input type="number" v-model="detData.secPhone">
							<text></text>
						</view>
						<view class="archives-form-item">
							<view class="afi-label">
								<text></text>
								<text>人口数量</text>
							</view>
							<input type="number" v-model="detData.popSize">
							<text></text>
						</view>
						<view class="archives-form-item">
							<view class="afi-label">
								<text></text>
								<text>土地总面积(亩)</text>
							</view>
							<input type="text" v-model="detData.totalLand">
							<text></text>
						</view>
						<view class="archives-form-item">
							<view class="afi-label">
								<text></text>
								<text>耕地总面积(亩)</text>
							</view>
							<input type="number" v-model="detData.culLand">
							<text></text>
						</view>
						<view class="archives-form-item">
							<view class="afi-label">
								<text></text>
								<text>种植总面积(亩)</text>
							</view>
							<input type="number" v-model="detData.plantLand">
							<text></text>
						</view>
						<view class="archives-form-item" style="border: none;">
							<view class="afi-label">
								<text></text>
								<text>户均种植面积(亩)</text>
							</view>
							<input type="number" v-model="detData.aveLand">
							<text></text>
						</view>

					
					</view>
				</view>
			</view>
		</view>
		<!-- 头部表格end -->
		<!-- 特色产业start -->
		<view v-for="(item,index) in detData.nongdanCharttPo" :key="index">
			<view class="basicInformation">
				<showFrom  ref="perForm" :TabeformData="item" :keyData="feaList" :index="index"></showFrom>
			</view>
		</view>
		<!-- 特色产业end -->
		<!-- 个人经营基本信息 start-->
		<view v-for="(item,index) in detData.personPoList" :key="index+'idINdex'">
			<view class="basicInformation">
				<showFrom ref="perForm" :TabeformData="item" :keyData="preList" :index="index"></showFrom>
			</view>
		</view>
		<!-- 个人经营信息end -->
		<!-- 合作社信息start -->
		<view v-for="(item,index) in detData.cooperativePoList" :key="index+'artNums'">
			<view class="messageSubject">
				<showFrom disabled='true'  ref="perForm" :TabeformData="item" :keyData="artList" :index="index"></showFrom>
			</view>
		</view>
		<!-- 合作社信息end -->

		<!-- 企业信息start -->
		<view v-for="(item,index) in detData.enterprisePoList" :key="index+'comNums'">
			<view class="messageSubject">
				<showFrom ref="perForm" :TabeformData="item" :keyData="comList" :index="index"></showFrom>
			</view>
		</view>
		<!-- 企业信息end -->
	</view>
</template>

<script>
	import {
		detail
	} from "@/static/js/api/detail.js"
	import {
		agriculturalData
	} from "./../agricultural/config.js"
	import {
		getAmend
	} from '@/static/js/api/getAmend.js'
	export default {
		data() {
			return {
				TabeformData: "",
				Data: [],
				detData: "", //详情数据
				id: 0, //详情id
				//个人经营
				preList: agriculturalData.preList,
				artList: agriculturalData.artList,
				comList: agriculturalData.comList,
			};
		},
		onLoad(opinte) {
			this.id = opinte.id
			this.beg(this.id)
		},
		methods: {
			async beg(id) {
				this.Data = await detail(id)
				this.detData = this.Data.data
				for (var i = 0; i < this.detData.personPoList.length; i++) {
					this.TabeformData = this.detData.personPoList[i]
				}
			},
			
		},
	}
</script>

<style lang="scss">
	@import "@/uni_modules/uview-ui/index.scss";

	* {
		font-size: 28rpx;
	}

	.agriculturalBox {
		width: 100%;
		height: auto;
		padding-bottom: 100rpx;
		background: #F4F4F4;

		.messagehead {
			width: 710rpx;
			background: #FFFFFF;
			border-radius: 20rpx;
			margin-left: 20rpx;

			.archives-title {
				padding: 15rpx 30rpx;
				background: #f5f2f8;
				font-size: 28rpx;
				color: #979698;
			}

			.archives-form {
				padding: 0 10rpx;

				input {
					font-size: 28rpx;
				}
			}

			.archives-form-item {
				display: flex;
				align-items: center;
				padding: 21rpx 0;
				border-bottom: 1rpx solid #f5f2f8;

				input {
					width: 100%;
					margin-left: 120rpx;
				}

				text {
					flex-shrink: 0;
				}
			}

			.afi-label {
				display: flex;
				align-items: center;
				font-size: 28rpx;
			}

			.afi-label>text:nth-child(1) {
				color: red;
				font-size: 26rpx;
				line-height: 30rpx;
				min-width: 20rpx;
			}

			.afi-label>text:nth-child(2) {
				min-width: 200rpx;
			}

			.bottom-btn {
				display: flex;
				justify-content: center;
				align-items: center;
				padding-bottom: 30rpx;
				padding-top: 10rpx;
				box-shadow: -2rpx 0 20rpx 2rpx #e0e5eb;
				position: fixed;
				background: #fff;
				z-index: 10;
				left: 0;
				bottom: 0;
				width: 100%;
			}

			.draft {
				width: 190rpx;
				height: 80rpx;
				border: 2px solid #999999;
				border-radius: 40rpx;
			}

			.submit {
				width: 495rpx;
				height: 80rpx;
				background: linear-gradient(270deg, #1478FF 0%, #3BBCDC 100%);
				border-radius: 40rpx;
				font-size: 28rpx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #FFFFFF;
				line-height: 80rpx;
			}


		}

		.messageSubject {
			width: 710rpx;
			// height: 100%;
			background: #FFFFFF;
			border-radius: 20rpx;
			margin-top: 20rpx;
			margin-left: 20rpx;
			margin-bottom: 35rpx;
			border: 1px solid #EEEEEE;
			box-shadow: 3rpx 3rpx 8rpx 0rpx rgba(0, 0, 0, 0.05);
			padding: 20rpx;


			.archives-form {
				input {
					font-size: 28rpx;
				}
			}

			.archives-form-item {
				display: flex;
				align-items: center;
				padding: 21rpx 0;
				border-bottom: 1rpx solid #f5f2f8;

				input {
					width: 100%;
					margin-left: 100rpx;
				}

				text {
					flex-shrink: 0;
				}
			}

			.afi-label {
				display: flex;
				align-items: center;
				font-size: 28rpx;
			}

			.afi-label>text:nth-child(1) {
				color: red;
				font-size: 26rpx;
				line-height: 30rpx;
				min-width: 20rpx;
			}

			.afi-label>text:nth-child(2) {
				min-width: 200rpx;
			}

			.mainNumber {
				width: 100%;
				// height: 200rpx;
			}

			.num_list {
				display: flex;
				align-items: center;
			}

			.num_text {
				margin-left: 250rpx;
			}

			.main_form_btn {
				width: 400rpx;
				height: 60rpx;
				background: #1478FF;
				border-radius: 30rpx;

				font-size: 28rpx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #FFFFFF;
				margin-top: 30rpx;
				margin-bottom: 30rpx;
			}
		}

		.main_title {
			display: flex;
			justify-content: space-between;
			align-items: center;
			border-bottom: 1px solid #EEEEEE;
			height: 85rpx;
			font-size: 28rpx;
			font-family: PingFang SC;
			font-weight: 500;
			color: #333333;
		}

		.recently-a {
			height: 67rpx;
			display: flex;

			.recently-a-a {
				width: 6rpx;
				height: 28rpx;
				background: #1478FF;
				margin-top: 20rpx;
			}

			.recently-a-b {
				font-size: 28rpx;
				font-family: PingFang SC;
				font-weight: 800;
				color: #333333;
				margin-left: 8rpx;
				margin-top: 17rpx;
			}
		}

		.recently-a-j {
			height: 80rpx;
			margin-top: 5rpx;
			border-bottom: 1rpx solid #EEEEEE;
		}

		.basicInformation {
			width: 710rpx;
			height: auto;
			background: #FFFFFF;
			border-radius: 20rpx;
			margin-top: 20rpx;
			margin-left: 20rpx;
			margin-bottom: 20rpx;
			border: 1rpx solid #EEEEEE;
			box-shadow: 3rpx 3rpx 8rpx 0rpx rgba(0, 0, 0, 0.05);
			padding: 0 20rpx;
			padding-bottom: 20rpx;
		}

		.mine_mes {
			// position: relative;
			margin-bottom: 25rpx;
			// display: flex;
		}

		.mine_add_name {
			width: 250rpx;
			height: 87rpx;
			line-height: 87rpx;
		}

	}

	.textarea {
		border: solid 1px #ccc;
	}
</style>